import pagesJson from '@/pages.json'

/** 判断当前页面是否是tabBar页  */
export const getIsTabBar = () => {
  if (!Object.keys(pagesJson).includes('tabBar')) {
    return false
  }
  const pages = getCurrentPages()
  const currPath = pages.at(-1).route
  // @ts-ignore
  return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath)
}
